# Handle options for finding LAPACK

if(NOT DEFINED LAPACK_VENDOR AND DEFINED ENV{MKLROOT} AND IS_DIRECTORY "$ENV{MKLROOT}")
  set(LAPACK_VENDOR MKL)
endif()

if(find_static)
  list(APPEND LAPACK_VENDOR STATIC)
endif()

find_package(LAPACK REQUIRED COMPONENTS ${LAPACK_VENDOR})
